﻿@using Global.Core.ExtensionMethod
@using Ducu.GLB.Global.ExtensionMethods
@model IList<Ducu.SRV.ViewModel.Task.Shared._DayModel>
<table class="table table-bordered">
    <tbody>
        <tr>
            <th>周</th>
            @{int j = 0;}
            @for (int i = 0; i < 7; i++)
            {
                <td>
                    @if (i + Model.Count < 7)
                    {
                        j++;
                    }
                    else
                    {
                        @Model[i-j].CompleteDate.GetChineseWeekDay().NumberToChinese()
                    }
                </td>
            }
        </tr>
        <tr>
            <th><span class="glyphicon glyphicon-calendar"></span></th>
            @{int k = 0;}
            @for (int i = 0; i < 7; i++)
            {
                <td>
                    @if (i + Model.Count < 7)
                    {
                        k++;
                    }
                    else
                    {
                        @Html.Partial("Shared/_Day", Model[i-k])
                    }
                </td>
            }
        </tr>
    </tbody>
</table>
